def solution(s: str) -> int:
    # PLEASE DO NOT MODIFY THE FUNCTION SIGNATURE
    # write code here
    from collections import Counter
    char_dict = Counter(s.lower())
    k_num = char_dict.get("k", 0)
    u_num = char_dict.get("u", 0)
    return min(k_num, u_num)

if __name__ == '__main__':
    print(solution("AUBTMKAxfuu") == 1)
    print(solution("KKuuUuUuKKKKkkkkKK") == 6)
    print(solution("abcdefgh") == 0)